function checkName() {
    var name = document.myform.name.value;
    var nametab = document.getElementById('nametab');
    if(/^[\u4e00-\u9fa5_a-zA-Z0-9]{2,18}$/.test(name)){
        nametab.innerHTML = '√';
        nametab.style.color = '#0a0';
        return true;
    }else{
        nametab.innerHTML = '×';
        nametab.style.color = '#f00';
        return false;
    }
}

function checkRemark() {
    var remark = document.myform.remark.value;
    var remarktab = document.getElementById('remarktab');
    if(/^[\u4e00-\u9fa5_a-zA-Z0-9]+$/.test(remark)){
        remarktab.innerHTML = '√';
        remarktab.style.color = '#0a0';
        return true;
    }else{
        remarktab.innerHTML = '×';
        remarktab.style.color = '#f00';
        return false;
    }
}
// 表单提交验证
function checkForm() {
    return checkName() && checkRemark();
}